package com.wechat.wechat.utils;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

/**
 * json格式化工具
 * @author NN
 * @2020/2/25 18:48
 */
public class JsonUtil {
    public static String toJson(Object object){
        GsonBuilder gsonBuilder=new GsonBuilder();
        gsonBuilder.setPrettyPrinting();
        Gson gson = gsonBuilder.create();
        return gson.toJson(object);
    }
}
